1. Field of the Invention
The invention relates generally to storage devices and more specifically relates to Serial Advanced Technology Attachment (“SATA”) device detection.
2. Discussion of Related Art
Although computer systems have increased in operating speed dramatically, initialization of the computer systems has remained time consuming. Slow booting of the computer systems and slow initialization of their related components have long been sources of complaint by users and customers, and these remain to be problems faced by computer system and device manufacturers. One related component of a computer system is the storage subsystem, which may be considered part of the computer system, external to the computer system, and/or both (i.e., a portion of the storage subsystem may be seen as part of the computer system while another portion may be seen as external to the computer system) in a wide variety of configurations.
Many storage subsystems today conform to standards including SATA and Serial Attached SCSI (“SAS”). Additionally, many storage subsystems comprise a storage initiator and a SATA target device. The storage initiator initiates communication with the SATA target device including proper detection of the SATA target device. Examples of the storage initiator include a SAS controller (e.g., a SAS Redundant Array of Independent Disks (“RAID”) host bus adapter), a self-configuring SAS expander, and a SATA controller. The SAS controller and the SAS expander would support the Serial ATA Tunneling Protocol (“STP”) in order for them to communicate with the SATA target device. A SAS expander typically facilitates communications between SATA/SAS devices rather than initiating communication on its own. However, a self-configuring SAS expander is capable of initiating communication in order to fill its own routing table for routing storage requests.
One cause for the slow initialization of the storage subsystem is that the SATA target device in some instances fails to send a valid Frame Information Structure (“FIS”) to the storage initiator. As a result, the storage initiator fails to detect the SATA target device, causing significant delays as the storage initiator times out and restarts the initialization process. More specifically, during initialization the storage initiator and the SATA target device exchange a series of messages and negotiate a communication speed. The storage initiator then expects to receive a valid FIS from the SATA target device. If the storage initiator receives an invalid FIS, the storage initiator simply ignores the invalid FIS and continues to wait before restarting the initialization process. The waiting/timeout period may be as long as sixty seconds, which contributes to and exacerbates the slow booting of the computer system.
One potential solution is to wait a shorter period of time, for example by having a waiting/timeout period shorter than sixty seconds. However, it is difficult to configure an ideal waiting/timeout period because there are many types of SATA target devices. For example, if the SATA target device is a large SATA disk drive, it may take a long time for the large SATA disk drive to send an FIS. If the storage initiator times out too soon, the storage initiator would time out repeatedly without even giving the SATA target device an opportunity to send a valid FIS. Conversely, if the SATA target device is a small SATA disk drive, the storage initiator would still waste too much time waiting after ignoring an invalid FIS sent by the small SATA disk drive.
Another source of problem is that the SATA target device may in some instances fail to send a valid FIS due to design flaws that do not conform to the standards. In certain cases, it has been identified that some SATA disk drives abnormally send an invalid FIS for some reason even though the SATA disk drives have not yet completed initializing their internal state machine. However, many of these SATA disk drives have already been mass produced and widely distributed; replacing them would be cost prohibitive. Additionally, even if this particular identified problem is corrected, there may be other causes for the SATA target device to fail to send a valid FIS and still cause significant delays in detecting the SATA target device.
Thus it is an ongoing challenge to improve detection of SATA target devices.